package cn.cloudbae.controller;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import cn.cloudbae.domain.DfJob;

@RestController
@RequestMapping(value="/init")
public class IndexController {
	
	/**
	 * 向数据库中插入firstDataFlowJob的测试数据
	 */
	@PostMapping(value="/first")
	public void initdb() {
		for(int i=1; i<=80; i++) {
			DfJob job = new DfJob();
			job.setJobResult("unset");
			job.setJobCount(0);
			job.setJobName("firstDataFlowJob");
			job.save();
		}
			
	}
}
